<template>
    <div>
        <MyIconComponent :type="iconType" />
    </div>
</template>

<script lang="ts" setup>
import { createFromIconfontCN } from "@ant-design/icons-vue";
import { ref } from "vue";
// 创建从 Iconfont CN 获取图标的实例
const MyIconComponent = createFromIconfontCN({
    scriptUrl: "//at.alicdn.com/t/c/font_4632151_rfhwrpfqwcm.js", // 替换为你实际的 scriptUrl
    //  scriptUrl 在阿里图标库里面去生成，添加新的图标都需要重新生成js文件
});

let props = defineProps<{ type?: string }>();

const iconType = ref<string>("");

iconType.value = props.type == undefined ? "icon-tuichu" : props.type;
</script>

<style lang="scss" scoped>

</style>3